package com.testbank.question;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.testbank.R;

public class QuestionSet extends Fragment {
	
	public static final String ARG_QUESTION_NUMBER = "question_number";
	
	public QuestionSet() {
         // Empty constructor required for fragment subclasses
     }

     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
         
    	 View rootView = inflater.inflate(R.layout.fragment_planet, container, false);
         int i = getArguments().getInt(ARG_QUESTION_NUMBER);
         String planet = getResources().getStringArray(R.array.questions_array)[i];

         /*int imageId = getResources().getIdentifier(planet.toLowerCase(Locale.getDefault()),
                         "drawable", getActivity().getPackageName());
         ((ImageView) rootView.findViewById(R.id.image)).setImageResource(imageId);*/
         getActivity().setTitle(planet);
         return rootView;
         
     }
}
